<script setup lang="ts">
import { useCounterStore } from './store/counter'

const app= useCounterStore()
</script>

<template>
<h1>状态管理</h1>
<p>app:{{app}}</p>
<p>app.totalCount:{{ app.totalCount }}</p>
<p>双倍：{{app.doubleTotalCount}}</p>
<button @click="app.addTotalCount(1)">点击加1</button>
<button @click="app.addTotalCount(10)">点击加10</button>
</template>

<style scoped>

</style>